package com.example.demo.service.imp;

import com.example.demo.dao.IMovie;
import com.example.demo.entity.Movie;
import com.example.demo.service.MovieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MovieServiceImp implements MovieService {
    @Autowired
    private IMovie iMovie;
    @Override
    public int insertMovie(Movie movie){
        return iMovie.insertMovie(movie);
    }

    @Override
    public List<Movie> getAll(Movie movie) {
        return iMovie.getAll(movie);
    }

    @Override
    public int deleteMovie(int id) {
        return iMovie.deleteMovie(id);
    }


    @Override
    public int updateMovie(Movie movie) {

        return iMovie.updateMovie(movie);
    }
}

